<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Seleksi CPNS 2013</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link type="text/css" rel="stylesheet" href="css/styles/form.css?v3.1.1187" />
<link href="css/calendarview.css?v3.1.1187" rel="stylesheet" type="text/css" />
<script src="js/jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="js/jquery-ui-1.8.16/jquery-1.6.2.js"></script>

<!--jquery autocomplete-->
<link rel="stylesheet" href="js/jquery-ui-1.8.16/themes/base/jquery-ui.css" type="text/css" />
<script type="text/javascript" src="js/jquery-ui-1.8.16/ui/jquery-ui.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.16/ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.16/ui/jquery.ui.position.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.16/ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="js/jquery.validate.js"></script>
<style>
fieldset {
	width: 570px;
	border:1px solid black; 
	padding:0 1.4em 1.4em 1.4em; 
	margin:0 0 1.5em 0;
}

legend {
	padding: 0.5em 0.5em;
	border: 1px solid black;
	color: black;
	font-size: 100%;
	text-align: right;
}

/*css validation*/
label.valid {
	width: 24px;
	height: 24px;
	/*background: url(assets/img/valid.png) center center no-repeat;*/
	display: inline-block;
	text-indent: -9999px;
}

label.error {
	font-weight: bold;
	color: red;
	padding: 2px 8px;
	margin-top: 2px;
}
</style>
<!--[if lt IE 7]>
		<script type="text/javascript" src="js/ie_png.js"></script>
		<script type="text/javascript">ie_png.fix('.png, .carousel-box .next img, .carousel-box .prev img');</script>
		<link href="css/ie6.css" rel="stylesheet" type="text/css" />
		<![endif]-->
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-44204367-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
<style type="text/css">
<!--
.style1 {color: #000000}
.style5 {color: #990000}
-->
        </style>
</head>
<body id="page1">
<div class="tail-top">
  <div id="header">
    <div class="center"><a href="#"><img src="images/header-bg2.png" alt="" width="972" height="205" border="0" /></a></div>
    <div class="left"></div>
    <!--</div> -->
    <div class="right"> </div>
    <!--       <ul>
         <li><a href="contact-us.jsp"><img src="images/hubungi.png" alt="Hubungi Kami" width="43" height="45"  style="float:right;margin:0 5px 0 0;"/><div class="extra-wrap"><span>Hubungi Kami</span></div></a>
 
         <li><a href="index.jsp" class="active"><img src="images/home.png" alt="" width="43" height="45" style="float:right;margin:100 5px 0 0;"/> </a></li>
        </ul>-->
    <table width="100%" border="0">
      <center>
        <tr>
          <td width="87%"><marquee>Untuk tampilan terbaik diharapkan menggunakan browser <b>Mozilla Firefox 3 atau Safari</b> atau diatasnya.</marquee></td>
          <td width="7%"><img src="images/home.png" width="30" height="30"></td>
          <td width="6%"><img src="images/hubungi.png" width="30" height="30"></td>
        </tr>
        <tr>
          <td width="87%">&nbsp;</td>
          <td width="7%"><a href="ActionServlet?page=home">
            <div class="inside">Beranda</div>
            </a></td>
          <td width="6%"><a href="ActionServlet?page=contact-us">
            <div class="extra-wrap">Kontak</div>
            </a></td>
        </tr>
      </center>
    </table>
  </div>
  <div id="content">
    <div class="row-1">
      <div class="inside">
        <div class="container">
          <div class="aside">
            <h3>Menu Utama </h3>
            <ul>
              <li> <a href="ActionServlet?page=informasi-umum"><img src="images/general.png" alt="" width="43" height="41" border="0" />
                <div class="extra-wrap"> <span><strong>Informasi Umum</strong></span>Informasi Terkait Pendaftaran CPNS 2013<a href="#"></a> </div>
                </a> </li>
              <li> <a href="ActionServlet?page=pengumuman"><img src="images/pengumuman.png" alt="" width="43" height="41" border="0" />
                <div class="extra-wrap"> <span><strong>Pengumuman</strong></span>Pengumuman Pendaftaran di Instansi Pemerintah<a href="#"></a> </div>
                </a> </li>
              <li> <a href="ActionServlet?page=peraturan"><img src="images/peraturan.png" alt="" width="43" height="41" border="0" />
                <div class="extra-wrap"> <span><strong>Peraturan</strong></span>Kumpulan Peraturan Seleksi CPNS Nasional 2013<a href="#"></a> </div>
                </a> </li>
              <li> <a href="ActionServlet?page=jadwal"><img src="images/jadwal.png" alt="" width="43" height="41" border="0" />
                <div class="extra-wrap"> <span><strong>Jadwal Pelaksanaan</strong></span>Jadwal Pelaksanaan Seleksi CPNS Nasional 2013<a href="#"></a> </div>
                </a> </li>
              <li> <a href="ActionServlet?page=alur"><img src="images/alur.png" alt="" width="43" height="41" border="0" />
                <div class="extra-wrap"> <span><strong>Alur</strong></span>Prosedur Seleksi CPNS Nasional<a href="#"></a> </div>
              </li>
		<li> <a href="ActionServlet?page=petunjuk"><img src="images/general.png" alt="" width="43" height="41" border="0" />
                <div class="extra-wrap"> <span><strong>Petunjuk Pendaftaran CPNS</strong></span>Petunjuk Pendaftaran CPNS Nasional<a href="#"></a> </div>
              </li>
              <li> <a href="ActionServlet?page=daftar"><img src="images/daftar.png" alt="" width="43" height="41" border="0" />
                <div class="extra-wrap"> <span><strong>Pendaftaran CPNS</strong></span>Pendaftaran CPNS Nasional<a href="#"></a> </div>
              </li>
              <li> <a href="ActionServlet?page=hasil"><img src="images/hasil.png" alt="" width="43" height="41" border="0" />
                <div class="extra-wrap"> <span><strong>Hasil Seleksi</strong></span>Hasil Seleksi CPNS Nasional<a href="#"></a> </div>
              </li>
            </ul>
            <div class="wrapper"></div>
          </div>
          <div class="content">
            <div class="box" >
			
              <h3 class="style1">Hasil Seleksi CPNS Tahun 2013  </h3>
            </div>

			<!-- Codes by HTML.am scrolling box-->
<div>
							<p>Pengumuman Hasil Seleksi  CPNS dapat dilihat berdasarkan pencarian No. Registrasi seperti dibawah ini : </p>
			<form action="/sscnServer/HasilServlet" method="post" name="searchForm" id="formPencarian">
				<input type="hidden" name="formID" value="32063786011852"/>
				<table id="infoTable">
        			<tr>
        				<td><label class="form-label-left" id="label_6" for="input_6">Cari No Peserta :</td>
        				<td><input id="noPeserta" class=" form-textbox" type="text" onkeyup="caps(this)" size="35" name="noPeserta" data-type="input-textbox" title="Nomor Peserta"></td>
        			</tr>
        			<tr>
        				<td><label class="form-label-left" id="label_7" for="input_7">Tanggal Lahir </label></td>
        				<td><input type="text" name="tglLahir" title="Tanggal Lahir" size="10"
														id="tglLahir"  /> <label>
														ddmmyyyy</label></td>
        			</tr>	
        			<tr>
        				<td></td>
        				<td><button type="submit" id="btnCari">&nbspCari&nbsp</button></td>
        			</tr>
        		</table>
        	</form>
        	<div id="info" style="display: none">
				
			</div>	

</div>		
			<!--untuk footer -->
			
            <div class="wrapper"></div>
          </div>
          <div class="clear"></div>
        </div>
      </div>
    </div>
  </div>


  <div id="footer">
    <div class="footerlink">
      <p class="lf">Hak Cipta  &copy;  2013 Badan Kepegawaian Negara. Semua Hak Dilindungi.</p>
      <p class="rf">Website : <a href="http://www.bkn.go.id/">www.bkn.go.id</a> </p>
      <div style="clear:both;"></div>
    </div>
  </div>
</div>

</body>
</html>

<script>
	function caps(element){
	    element.value = element.value.toUpperCase();
	}
</script>
<script>
	$(function() {
		//$("#datepickerTglLahir").datepicker();
		
		/*
		$("#datepickerTglLahir").datepicker({
			changeMonth : true,
			changeYear : true,
			yearRange : '1973:1995',
			dateFormat : "ddmm-yy"
		}); */

 		$('#formPencarian').validate(
				{
					rules : {
						noPeserta : {
							minlength : 11,
							maxlength: 18,  
							required : true
						},
						tglLahir : {
							required : true
						}
					},
					highlight : function(element) {
						$(element).closest('.control-group')
								.removeClass('success').addClass(
										'error');
					},
					success : function(element) {
						
					},
					submitHandler: function(form) {
					    // ajax to /sscnServer/hasil
					    var formData = $('#formPencarian').serializeArray();
						$.ajax({
						    url : "/sscnServer/HasilServlet",
						    type: "POST",
						    data : formData,
						    success: function(data, textStatus, jqXHR)
						    {	
						    //	var table = '<tr><td>&nbsp;</td><td></td></tr>'; 
							 //   	'<tr><td>' + data.table.product + '</td><td>' + result.table.code + '</td><td>' + result.table.value + '</td><td>' + result.table.time + '</td></tr>';
								$('#info').html('');   
							    if (data.result == 1){
								    var stat = "";
								    
								    if (data.hasil.status == "M"){
										stat = "Memenuhi Passing Grade";    
									} else {
										stat = "Tidak Memenuhi Passing Grade";
									}
							    	var html = "<p><hr/><br/>"+
				    					"<h2>No Peserta : " + data.peserta.noPeserta + "<br>" +
				    					"<h2>Nama : " + data.peserta.nama + "<br>" +
				    					"<h2>Tgl Lahir : " + data.peserta.tglLahir + "<br>" +
				    					"<h2>Nilai TWK : " + data.hasil.nilai01 + "<br>" +
				    					"<h2>Nilai TIU : " + data.hasil.nilai02 + "<br>" +
				    					"<h2>Nilai TKP : " + data.hasil.nilai03 + "<br>" +
				    					"<h2>Status : " + stat + "<br>" + 
					    	   		"</p>";
					    	   		$('#info').append(html);
								} else {
									var html = "<p><hr/><br/>"+
			    					"<h2>" + data.message + "<br>";
				    	   		"</p>";
				    	   			$('#info').append(html);
								}
								
						    	$('#info').show();
						    	//$('#infoTable').append( table );	
						        //data - response from server
						    },
						    error: function (jqXHR, textStatus, errorThrown)
						    {
						 		alert(textStatus);
						    }
						});			                    
	                }
				});

	});

	
</script>